package com.yl.auth.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yl.auth.model.entity.Chuangwei;
import com.yl.auth.model.entity.Laoren;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.time.LocalDate;
import java.util.Date;

/**
 * <p>
 *
 * </p>
 *
 * @author yl
 * @since 2023-06-25
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "预定登记管理")
public class Yudingdengji implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 预定主键
     */
      @TableId(value = "id", type = IdType.AUTO)
      @ApiModelProperty("预定id")
    private Long id;

    /**
     * 预定人姓名
     */
    @ApiModelProperty("预定人姓名")
    @TableField("name")
    private String yname;

    /**
     * 预定联系方式
     */
    @ApiModelProperty("预定联系方式")
    private String phone;

    /**
     * 床位id外键
     */
    @ApiModelProperty("床位外键")
    @TableField("bed_id")
    private Integer bedId;

    /**
     * 预定时长(月)
     */
    @ApiModelProperty("预定时长(月)")
    private String shichang;

    /**
     * 已缴定金
     */
    @ApiModelProperty("已缴定金")
    private String dingjin;

    /**
     * 与老人的关系
     */
    @ApiModelProperty("与老人关系")
    private String elderly;

    /**
     * 剩余天数
     */
    @ApiModelProperty("剩余天数")
    private String shengyu;

    @ApiModelProperty("登记日期")
    private LocalDate dengji;

    /**
     * 状态 0:待提交1;预定中2:已取消3：入院待提交4：入院待下单5:入院待评估6:入院已完成 7:入院已取消8:待出院9:已出院
     */
    @ApiModelProperty("状态 0:待提交1;预定中2:已取消3：入院待提交4：待下单5:待评估6:已完成7:已取消8:待出院   9:已出院")
    private Integer status;

    @ApiModelProperty("开始日期")
    private LocalDate kaishi;

    /**
     * 老人外键
     */
    @ApiModelProperty("老人外键")
    private Long laorenId;

    @ApiModelProperty("申请时间")
    private LocalDate shenqing;

    @ApiModelProperty("预计出院时间")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date chuyuandate;

    @ApiModelProperty("出院原因")
    private String chuyuandesc;

    @ApiModelProperty("上传协议地址")
    private String xieyi;
    /**
     * 一对一关系
     */
    @TableField(exist = false)
    @ApiModelProperty("老人实体类")
    private Laoren laoren;

    /**
     * 一对一床位关系
     */
    @TableField(exist = false)
    @ApiModelProperty("床位实体类")
    private Chuangwei chuangwei;

    @ApiModelProperty("预定的床位信息")
    @TableField(exist = false)
    private String chuangWeiYu;

    @ApiModelProperty("入院床位信息")
    @TableField(exist = false)
    private String ruyuanChuangWei;

    @ApiModelProperty("出院房间信息")
    @TableField(exist =  false)
    private String fangjianChuYuan;

    @TableField(exist =  false)
    private Fangjian fangjian;

    @TableField(exist = false)
    private String[] yudingxieyi = {};

    @TableField("is_delete")
    @TableLogic
    private Integer isDelete;

}
